package com.diyunapp.xilinapp.selfdefine;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

public class FragmentAdapter extends FragmentPagerAdapter {

	private List<Fragment> fragmentList;
	 
	public FragmentAdapter(FragmentManager fm, List<Fragment> fragmentList) {
		super(fm);  
        this.fragmentList = fragmentList;  
    }  
	 
	@Override
	public Fragment getItem(int arg0) {
		// TODO Auto-generated method stub
		 return fragmentList.get(arg0); 
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return fragmentList.size();
	}

}
